myBoost="$$my3RDDIR/boost"
message("Prepare BOOST from $$myBoost")
message("Options are: boost_log, boost_threading, boost_unit_testing")
message("for...")

INCLUDEPATH += "$$myBoost"

already_boost_system {
} else {
    CONFIG += already_boost_system
    macx {
        message("OS X")
        LIBS += -lboost_system
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_system.a
    } else:win32-g++ {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_system
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_system.a
    } else:win32 {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_system
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_system.lib
    } else:unix {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_system
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_system.a
    } else {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
    }

    win32:CONFIG(release, debug|release): LIBS += -L$$my3RDLIBDIR/release/ -lmpfr
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$my3RDLIBDIR/debug/ -lmpfr
    else:unix: LIBS += -L$$my3RDLIBDIR/ -lmpfr

    HEADERS += "$$my3RDINCLUDEDIR"/mpfr.h
    HEADERS += "$$my3RDINCLUDEDIR"/gmp.h

    win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/release/libmpfr.a
    else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/debug/libmpfr.a
    else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/release/mpfr.lib
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/debug/mpfr.lib
    else:unix: PRE_TARGETDEPS += $$my3RDLIBDIR/libmpfr.a

    win32:CONFIG(release, debug|release): LIBS += -L$$my3RDLIBDIR/release/ -lgmp
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$my3RDLIBDIR/debug/ -lgmp
    else:unix: LIBS += -L$$my3RDLIBDIR/ -lgmp

    win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/release/libgmp.a
    else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/debug/libgmp.a
    else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/release/gmp.lib
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$my3RDLIBDIR/debug/gmp.lib
    else:unix: PRE_TARGETDEPS += $$my3RDLIBDIR/libgmp.a

}

already_boost_threading: {
} else:boost_threading {
    CONFIG += already_boost_threading
    message("Prepare boost threading for...")
    macx {
        message("OS X")
        LIBS += -lboost_thread
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_thread.a
    } else:win32-g++ {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_thread_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_thread_framework.a
    } else:win32 {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_thread_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_thread_framework.lib
    } else:unix {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_thread_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_thread_framework.a
    } else {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
    }
    DEFINES += IDalgo_THREAD_SAFE
}

already_boost_log: {
} else:boost_log {
    CONFIG += already_boost_log
    message("Prepare boost log for...")
    macx {
        message("OS X")
        LIBS += -lboost_log
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_log.a
    } else:win32-g++ {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_log_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_log_framework.a
    } else:win32 {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_log_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_log_framework.lib
    } else:unix {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_log_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_log_framework.a
    } else {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
    }
    DEFINES += IDalgo_THREAD_SAFE
}

already_boost_unit_testing {
} else: boost_unit_testing {
    CONFIG += already_boost_unit_testing
    message("Prepare boost tests for...")
    macx {
        message("OS X")
        LIBS += -lboost_unit_test_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_unit_test_framework.a
    } else:win32-g++ {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_unit_test_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_unit_test_framework.a
    } else:win32 {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_unit_test_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/boost_unit_test_framework.lib
    } else:unix {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
        LIBS += -lboost_unit_test_framework
        PRE_TARGETDEPS += "$$my3RDLIBDIR"/libboost_unit_test_framework.a
    } else {
        message("REMOVE THIS MESSAGE WHEN PROPERLY SETUP")
    }
}
